Intro: You might think that turning cubes is quite tedious, and it definitely becomes computationally exhaustive as we increase the number of twists.
Fortunately methods exist to make the job of the key exchangers easier: one such method is binary exponentiation!
Step 1: to begin, you need to know your set of twists, which are made public at the beginning of Rubie Cubeman. For the sake of example, lets assume G = {FRDDULDDR'F'}
Step 2: now what we do is we do G twist's 1,2,4,8,16 ... times (for the sake of simplicity we only did it up to 4). Then we put these cube states into a rubik's cube solver
so the computer can tell us how to get to the same cube state but with less moves! We store these "more efficient twists" as precomputed values. Try it for youself! see if the more efficient twists do their job (twist all the cubes)
Step 3: Ok so now that you see that the more efficient twists get to the same position just with less moves, we can now show that anycube up until 2X-1 where X is the highest power of two we computed (in our case its 4)
can be solved us by a combination of the precomputed values. Go ahead, pick the number of times you want to twist the cube then once it twists press next!
This is a cool algorithm that where if you simply precompute up to any 2^N, (So N saved cubes), you can end up doing 2*(2^N)-1 twists worth of G with only N twists of the precomputed values! So for example 2*(2^6)-1 = 127 twist can be done in only 6
if the cubes 2^1,2^2...2^6 are precomputed like before!